package com.example.myapplication;

import com.base.core.config.BaseResponse;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Url;

public interface ApiInterfae {

    /**
     * 有赞登录
     */
    @FormUrlEncoded
    @POST("/login")
    Observable<BaseResponse<Map<String, String>>> login(@FieldMap Map<String, Object> map);

    /**
     * 心跳
     */
    @FormUrlEncoded
    @POST()
    Observable<Object> beat(@Url String url,@Field("params") String params);

    /**
     * 心跳
     */
    @FormUrlEncoded
    @POST()
    Observable<Object> push(@Url String url, @Field("params") String params);

    /**
     * 心跳
     */
    @Headers("Content-Type:application/x-www-form-urlencoded; charset=utf-8")
    @FormUrlEncoded
    @POST("/logout")
    Observable<Object> loginOut(@FieldMap Map<String, Object> map);


}
